﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace Merbla.DesignByContract
{
    class Program
    {
        static void Main(string[] args)
        {
            IService service = new Service();
            service.DoSomething(string.Empty);  
            service.DoSomething(string.Empty,"Setting my own value");
            service.DoSomething(string.Empty, thingB: "Setting my own value"); 
            service.DoSomething(string.Empty, string.Empty,);


        }
    }

public class Service : IService
{
    public void DoSomething(string thingA)
    { 
    }
    public void DoSomething(string thingA, [Optional] string thingB)
    {
    }
    public void DoSomething(string thingA, string thingB, bool isSomeThing = false)
    {
    }
}

public interface IService
{
    void DoSomething(string thingA);

    void DoSomething(string thingA, [Optional] string thingB);

    void DoSomething(string thingA, string thingB, bool isSomeThing = false);
}
}
